package day02;

import java.io.IOException;
import java.util.Arrays;
import java.util.Map;
import java.util.Map.Entry;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DemoRequest extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {
//		String name = request.getParameter("name");
//		System.out.println(name);
//		
//		String password = request.getParameter("password");
//		System.out.println(password);
		
		Map<String, String[]> map = request.getParameterMap();
		for(Entry<String, String[]>entry:map.entrySet()) {
			System.out.println("key:"+entry.getKey()+" value:"+Arrays.toString(entry.getValue()));
		}
		
		String skills = request.getParameter("skills");
		System.out.println(skills);
		
		String[] strings = request.getParameterMap().get("skills");
		System.out.println(Arrays.toString(strings));
	}
}
